package com.luo.partner.result;

public class ResultUtil {

	//当正确时返回的值  
    public static Result success(Object data){
        Result<Object> result = new Result<>();
        result.setCode(0);  
        result.setMsg("成功");  
        result.setData(data);  
        return result;  
    }
    //当错误时返回的值
    public static Result error(int code,String msg){  
        Result<Object> result = new Result<>();
        result.setCode(code); 
        result.setMsg(msg);  
        return result;  
    }  
    
    public static Result success(){  
        return success(null);  
    }  
}
